<template>
    <div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/welcome' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>订单管理</el-breadcrumb-item>
      <el-breadcrumb-item>订单列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
          <el-row type="flex" justify="" >
              <el-col :span="10">
                   <el-input
              placeholder="请输入内容"
              class="input-with-select"
            >
              <el-button slot="append" icon="el-icon-search" ></el-button>
            </el-input>
              </el-col>
          </el-row>
            <el-table
            :data="tabledata"
            border
            style="width: 100%;margin-top:15px">
            <el-table-column
            type="index"
            label="#"
            width="50">
            </el-table-column>
            <el-table-column
            prop="order_number"
            label="订单编号"
            width="220"
            >
            </el-table-column>
            <el-table-column
            prop="order_price"
            label="订单价格">
            </el-table-column>
              <el-table-column
            prop="order_pay"
            label="是否付款">
            <template slot-scope="scope">
                <el-tag type="success" v-if="scope.row.order_pay === '1'">已付款</el-tag>
                <el-tag type="danger" v-else>未付款</el-tag>
            </template>

            </el-table-column>
              <el-table-column
            prop="is_send"
            label="是否发货">
            </el-table-column>
            <el-table-column
            prop="address"
            label="下单时间">
            </el-table-column>
            <el-table-column
            label="操作">
         <template slot-scope="scope">
               <el-button type="primary" icon="el-icon-edit" circle @click="edit(scope.row)"></el-button>
            <el-button type="success" icon="el-icon-location-information" circle></el-button>
         </template>
            </el-table-column>
        </el-table>
    </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {
            data:{
                query: "",
                pagenum: 1,
                pagesize: 2,
            },
            tabledata:[]
        }
    },
    mounted(){
        this.ordersData()
    },
    methods: {
        ordersData(){
            this.axios.get('/orders',{params:this.data}).then(res=>{
                console.log(res);
                this.tabledata = res.data.data.goods
            })
        },
        edit(row){
            
        }
    },
}
</script>

<style>

</style>
